import { getInfo, setInfo } from '@/utils/storage'

export default {
  namespaced: true,
  state() {
    return {
      // 页面加载时只获取一次，后面用set修改
      userInfo: getInfo()
    }
  },
  mutations: {
    setUserInfo(state, obj) {
      state.userInfo = obj
      setInfo(obj)
    }
  },

  actions: {},

  getters: {}
}
